# Maintainer: Jonathan Steel <jsteel at archlinux.org>
# Maintainer: T.J. Townsend <blakkheim@archlinux.org>
# Contrinutor: Dan Serban
# Contributor: Franz Burgmann
# Contributor: Todd Partridge (Gen2ly)
# Contributor: Ivan Sichmann Freitas

pkgname=partclone
pkgver=0.3.23
pkgrel=1
pkgdesc="Utilities to save and restore used blocks on a partition"
arch=('loong64' 'x86_64')
url="https://partclone.org"
license=('GPL')
depends=('ntfs-3g' 'nilfs-utils')
source=($pkgname-$pkgver.tar.gz::https://github.com/Thomas-Tsai/partclone/archive/$pkgver.tar.gz)
sha256sums=('55f0d9dc6c66fae05ad5f134f46662d7a2737e25f871943f699d50808482678d')

build() {
  cd $pkgname-$pkgver
  ./autogen
  ./configure \
    --prefix=/usr \
    --enable-extfs \
    --enable-fat \
    --enable-hfsp \
    --enable-btrfs \
    --enable-ncursesw \
    --enable-ntfs \
    --enable-exfat \
    --enable-f2fs \
    --enable-minix \
    --enable-nilfs2 \
    --enable-xfs \
    --sbindir=/usr/bin
  make
}

package() {
  cd $pkgname-$pkgver
  make PREFIX=/usr DESTDIR="$pkgdir" install
}
